home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / QuickTime / QuickTime™ 2.5 / Interfaces for Programmers / AIncludes / ImageCodec.a < prev    next >
Encoding:
Text File  |  1997-02-26  |  19.3 KB  |  650 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ImageCodec.a
  3. ;
  4. ;    Contains:    QuickTime interfaces
  5. ;
  6. ;    Version:    Technology:    
  7. ;                Release:    QuickTime 2.5 interfaces to use with ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__IMAGECODEC__') = 'UNDEFINED' THEN
  19. __IMAGECODEC__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  28.     include 'QDOffscreen.a'
  29.     ENDIF
  30.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  31.     include 'Windows.a'
  32.     ENDIF
  33.     IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
  34.     include 'ImageCompression.a'
  35.     ENDIF
  36.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  37.     include 'Components.a'
  38.     ENDIF
  39.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  40.     include 'Movies.a'
  41.     ENDIF
  42. ;     codec capabilities flags    
  43.  
  44. codecCanScale                    EQU        $00000001
  45. codecCanMask                    EQU        $00000002
  46. codecCanMatte                    EQU        $00000004
  47. codecCanTransform                EQU        $00000008
  48. codecCanTransferMode            EQU        $00000010
  49. codecCanCopyPrev                EQU        $00000020
  50. codecCanSpool                    EQU        $00000040
  51. codecCanClipVertical            EQU        $00000080
  52. codecCanClipRectangular            EQU        $00000100
  53. codecCanRemapColor                EQU        $00000200
  54. codecCanFastDither                EQU        $00000400
  55. codecCanSrcExtract                EQU        $00000800
  56. codecCanCopyPrevComp            EQU        $00001000
  57. codecCanAsync                    EQU        $00002000
  58. codecCanMakeMask                EQU        $00004000
  59. codecCanShift                    EQU        $00008000
  60. codecCanAsyncWhen                EQU        $00010000
  61. codecCanShieldCursor            EQU        $00020000
  62. codecCanManagePrevBuffer        EQU        $00040000
  63. codecHasVolatileBuffer            EQU        $00080000
  64. codecWantsRegionMask            EQU        $00100000
  65. codecImageBufferIsOnScreen        EQU        $00200000
  66. codecWantsDestinationPixels        EQU        $00400000
  67. CodecCapabilities        RECORD 0
  68. flags                     ds.l    1                ; offset: $0 (0)
  69. wantedPixelSize             ds.w    1                ; offset: $4 (4)
  70. extendWidth                 ds.w    1                ; offset: $6 (6)
  71. extendHeight             ds.w    1                ; offset: $8 (8)
  72. bandMin                     ds.w    1                ; offset: $A (10)
  73. bandInc                     ds.w    1                ; offset: $C (12)
  74. pad                         ds.w    1                ; offset: $E (14)
  75. time                     ds.l    1                ; offset: $10 (16)
  76. sizeof                     EQU *                    ; size:   $14 (20)
  77.                         ENDR
  78. ;     codec condition flags    
  79.  
  80. codecConditionFirstBand            EQU        $00000001
  81. codecConditionLastBand            EQU        $00000002
  82. codecConditionFirstFrame        EQU        $00000004
  83. codecConditionNewDepth            EQU        $00000008
  84. codecConditionNewTransform        EQU        $00000010
  85. codecConditionNewSrcRect        EQU        $00000020
  86. codecConditionNewMask            EQU        $00000040
  87. codecConditionNewMatte            EQU        $00000080
  88. codecConditionNewTransferMode    EQU        $00000100
  89. codecConditionNewClut            EQU        $00000200
  90. codecConditionNewAccuracy        EQU        $00000400
  91. codecConditionNewDestination    EQU        $00000800
  92. codecConditionFirstScreen        EQU        $00001000
  93. codecConditionDoCursor            EQU        $00002000
  94. codecConditionCatchUpDiff        EQU        $00004000
  95. codecConditionMaskMayBeChanged    EQU        $00008000
  96. codecConditionToBuffer            EQU        $00010000
  97. codecConditionCodecChangedMask    EQU        $80000000
  98.  
  99. codecInfoResourceType            EQU        'cdci'                ; codec info resource type 
  100. codecInterfaceVersion            EQU        2                    ; high word returned in component GetVersion 
  101. CDSequenceDataSource    RECORD 0
  102. recordSize                 ds.l    1                ; offset: $0 (0)
  103. next                     ds.l    1                ; offset: $4 (4)
  104. seqID                     ds.l    1                ; offset: $8 (8)
  105. sourceID                 ds.l    1                ; offset: $C (12)
  106. sourceType                 ds.l    1                ; offset: $10 (16)
  107. sourceInputNumber         ds.l    1                ; offset: $14 (20)
  108. dataPtr                     ds.l    1                ; offset: $18 (24)
  109. dataDescription             ds.l    1                ; offset: $1C (28)
  110. changeSeed                 ds.l    1                ; offset: $20 (32)
  111. transferProc             ds.l    1                ; offset: $24 (36)
  112. transferRefcon             ds.l    1                ; offset: $28 (40)
  113. dataSize                 ds.l    1                ; offset: $2C (44)
  114. sizeof                     EQU *                    ; size:   $30 (48)
  115.                         ENDR
  116. ; typedef struct CDSequenceDataSource *    CDSequenceDataSourcePtr
  117.  
  118. CodecCompressParams        RECORD 0
  119. sequenceID                 ds.l    1                ; offset: $0 (0)        ;  precompress,bandcompress 
  120. imageDescription         ds.l    1                ; offset: $4 (4)        ;  precompress,bandcompress 
  121. data                     ds.l    1                ; offset: $8 (8)
  122. bufferSize                 ds.l    1                ; offset: $C (12)
  123. frameNumber                 ds.l    1                ; offset: $10 (16)
  124. startLine                 ds.l    1                ; offset: $14 (20)
  125. stopLine                 ds.l    1                ; offset: $18 (24)
  126. conditionFlags             ds.l    1                ; offset: $1C (28)
  127. callerFlags                 ds.w    1                ; offset: $20 (32)
  128. capabilities             ds.l    1                ; offset: $22 (34)        ;  precompress,bandcompress 
  129. progressProcRecord         ds        ICMProgressProcRecord ; offset: $26 (38)
  130. completionProcRecord     ds        ICMCompletionProcRecord ; offset: $2E (46)
  131. flushProcRecord             ds        ICMFlushProcRecord ; offset: $36 (54)
  132. srcPixMap                 ds        PixMap            ; offset: $3E (62)        ;  precompress,bandcompress 
  133. prevPixMap                 ds        PixMap            ; offset: $70 (112)
  134. spatialQuality             ds.l    1                ; offset: $A2 (162)
  135. temporalQuality             ds.l    1                ; offset: $A6 (166)
  136. similarity                 ds.l    1                ; offset: $AA (170)
  137. dataRateParams             ds.l    1                ; offset: $AE (174)
  138. reserved                 ds.l    1                ; offset: $B2 (178)
  139. ;  The following fields only exist for QuickTime 2.1 and greater 
  140. majorSourceChangeSeed     ds.w    1                ; offset: $B6 (182)
  141. minorSourceChangeSeed     ds.w    1                ; offset: $B8 (184)
  142. sourceData                 ds.l    1                ; offset: $BA (186)
  143. ;  The following fields only exit for QuickTime 2.5 and greater 
  144. preferredPacketSizeInBytes  ds.l 1                ; offset: $BE (190)
  145. sizeof                     EQU *                    ; size:   $C2 (194)
  146.                         ENDR
  147. CodecDecompressParams    RECORD 0
  148. sequenceID                 ds.l    1                ; offset: $0 (0)        ;  predecompress,banddecompress 
  149. imageDescription         ds.l    1                ; offset: $4 (4)        ;  predecompress,banddecompress 
  150. data                     ds.l    1                ; offset: $8 (8)
  151. bufferSize                 ds.l    1                ; offset: $C (12)
  152. frameNumber                 ds.l    1                ; offset: $10 (16)
  153. startLine                 ds.l    1                ; offset: $14 (20)
  154. stopLine                 ds.l    1                ; offset: $18 (24)
  155. conditionFlags             ds.l    1                ; offset: $1C (28)
  156. callerFlags                 ds.w    1                ; offset: $20 (32)
  157. capabilities             ds.l    1                ; offset: $22 (34)        ;  predecompress,banddecompress 
  158. progressProcRecord         ds        ICMProgressProcRecord ; offset: $26 (38)
  159. completionProcRecord     ds        ICMCompletionProcRecord ; offset: $2E (46)
  160. dataProcRecord             ds        ICMDataProcRecord ; offset: $36 (54)
  161. port                     ds.l    1                ; offset: $3E (62)        ;  predecompress,banddecompress 
  162. dstPixMap                 ds        PixMap            ; offset: $42 (66)        ;  predecompress,banddecompress 
  163. maskBits                 ds.l    1                ; offset: $74 (116)
  164. mattePixMap                 ds.l    1                ; offset: $78 (120)
  165. srcRect                     ds        Rect            ; offset: $7C (124)        ;  predecompress,banddecompress 
  166. matrix                     ds.l    1                ; offset: $84 (132)        ;  predecompress,banddecompress 
  167. accuracy                 ds.l    1                ; offset: $88 (136)        ;  predecompress,banddecompress 
  168. transferMode             ds.w    1                ; offset: $8C (140)        ;  predecompress,banddecompress 
  169. frameTime                 ds.l    1                ; offset: $8E (142)        ;  banddecompress 
  170. reserved                 ds.l    1                ; offset: $92 (146) <-- really an array of length one
  171. ;  The following fields only exist for QuickTime 2.0 and greater 
  172. matrixFlags                 ds.b    1                ; offset: $96 (150)        ;  high bit set if 2x resize 
  173. matrixType                 ds.b    1                ; offset: $97 (151)
  174. dstRect                     ds        Rect            ; offset: $98 (152)        ;  only valid for simple transforms 
  175. ;  The following fields only exist for QuickTime 2.1 and greater 
  176. majorSourceChangeSeed     ds.w    1                ; offset: $A0 (160)
  177. minorSourceChangeSeed     ds.w    1                ; offset: $A2 (162)
  178. sourceData                 ds.l    1                ; offset: $A4 (164)
  179. maskRegion                 ds.l    1                ; offset: $A8 (168)
  180. ;  The following fields only exist for QuickTime 2.5 and greater 
  181. wantedDestinationPixelTypes  ds.l 1                ; offset: $AC (172)        ;  Handle to 0-terminated list of OSTypes 
  182. screenFloodMethod         ds.l    1                ; offset: $B0 (176)
  183. screenFloodValue         ds.l    1                ; offset: $B4 (180)
  184. preferredOffscreenPixelSize  ds.w 1                ; offset: $B8 (184)
  185. sizeof                     EQU *                    ; size:   $BA (186)
  186.                         ENDR
  187.  
  188. matrixFlagScale2x                EQU        $00000080
  189. matrixFlagScale1x                EQU        $00000040
  190. matrixFlagScaleHalf                EQU        $00000020
  191.  
  192. kScreenFloodMethodNone            EQU        0
  193. kScreenFloodMethodKeyColor        EQU        1
  194. kScreenFloodMethodAlpha            EQU        2
  195. ;     codec selectors 0-127 are reserved by Apple 
  196. ;     codec selectors 128-191 are subtype specific 
  197. ;     codec selectors 192-255 are vendor specific 
  198. ;     codec selectors 256-32767 are available for general use 
  199. ;     negative selectors are reserved by the Component Manager 
  200. ;
  201. ; pascal ComponentResult ImageCodecGetCodecInfo(ComponentInstance ci, CodecInfo *info)
  202. ;
  203.     IF ¬ GENERATINGCFM THEN
  204.         Macro
  205.         _ImageCodecGetCodecInfo
  206.             dc.w                $2F3C
  207.             dc.w                $0004
  208.             dc.w                $0000
  209.             moveq               #0,d0
  210.             dc.w                $A82A
  211.         EndM
  212.     ELSE
  213.         IMPORT_CFM_FUNCTION ImageCodecGetCodecInfo
  214.     ENDIF
  215.  
  216. ;
  217. ; pascal ComponentResult ImageCodecGetCompressionTime(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, short depth, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *time)
  218. ;
  219.     IF ¬ GENERATINGCFM THEN
  220.         Macro
  221.         _ImageCodecGetCompressionTime
  222.             dc.w                $2F3C
  223.             dc.w                $0016
  224.             dc.w                $0001
  225.             moveq               #0,d0
  226.             dc.w                $A82A
  227.         EndM
  228.     ELSE
  229.         IMPORT_CFM_FUNCTION ImageCodecGetCompressionTime
  230.     ENDIF
  231.  
  232. ;
  233. ; pascal ComponentResult ImageCodecGetMaxCompressionSize(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, long *size)
  234. ;
  235.     IF ¬ GENERATINGCFM THEN
  236.         Macro
  237.         _ImageCodecGetMaxCompressionSize
  238.             dc.w                $2F3C
  239.             dc.w                $0012
  240.             dc.w                $0002
  241.             moveq               #0,d0
  242.             dc.w                $A82A
  243.         EndM
  244.     ELSE
  245.         IMPORT_CFM_FUNCTION ImageCodecGetMaxCompressionSize
  246.     ENDIF
  247.  
  248. ;
  249. ; pascal ComponentResult ImageCodecPreCompress(ComponentInstance ci, CodecCompressParams *params)
  250. ;
  251.     IF ¬ GENERATINGCFM THEN
  252.         Macro
  253.         _ImageCodecPreCompress
  254.             dc.w                $2F3C
  255.             dc.w                $0004
  256.             dc.w                $0003
  257.             moveq               #0,d0
  258.             dc.w                $A82A
  259.         EndM
  260.     ELSE
  261.         IMPORT_CFM_FUNCTION ImageCodecPreCompress
  262.     ENDIF
  263.  
  264. ;
  265. ; pascal ComponentResult ImageCodecBandCompress(ComponentInstance ci, CodecCompressParams *params)
  266. ;
  267.     IF ¬ GENERATINGCFM THEN
  268.         Macro
  269.         _ImageCodecBandCompress
  270.             dc.w                $2F3C
  271.             dc.w                $0004
  272.             dc.w                $0004
  273.             moveq               #0,d0
  274.             dc.w                $A82A
  275.         EndM
  276.     ELSE
  277.         IMPORT_CFM_FUNCTION ImageCodecBandCompress
  278.     ENDIF
  279.  
  280. ;
  281. ; pascal ComponentResult ImageCodecPreDecompress(ComponentInstance ci, CodecDecompressParams *params)
  282. ;
  283.     IF ¬ GENERATINGCFM THEN
  284.         Macro
  285.         _ImageCodecPreDecompress
  286.             dc.w                $2F3C
  287.             dc.w                $0004
  288.             dc.w                $0005
  289.             moveq               #0,d0
  290.             dc.w                $A82A
  291.         EndM
  292.     ELSE
  293.         IMPORT_CFM_FUNCTION ImageCodecPreDecompress
  294.     ENDIF
  295.  
  296. ;
  297. ; pascal ComponentResult ImageCodecBandDecompress(ComponentInstance ci, CodecDecompressParams *params)
  298. ;
  299.     IF ¬ GENERATINGCFM THEN
  300.         Macro
  301.         _ImageCodecBandDecompress
  302.             dc.w                $2F3C
  303.             dc.w                $0004
  304.             dc.w                $0006
  305.             moveq               #0,d0
  306.             dc.w                $A82A
  307.         EndM
  308.     ELSE
  309.         IMPORT_CFM_FUNCTION ImageCodecBandDecompress
  310.     ENDIF
  311.  
  312. ;
  313. ; pascal ComponentResult ImageCodecBusy(ComponentInstance ci, ImageSequence seq)
  314. ;
  315.     IF ¬ GENERATINGCFM THEN
  316.         Macro
  317.         _ImageCodecBusy
  318.             dc.w                $2F3C
  319.             dc.w                $0004
  320.             dc.w                $0007
  321.             moveq               #0,d0
  322.             dc.w                $A82A
  323.         EndM
  324.     ELSE
  325.         IMPORT_CFM_FUNCTION ImageCodecBusy
  326.     ENDIF
  327.  
  328. ;
  329. ; pascal ComponentResult ImageCodecGetCompressedImageSize(ComponentInstance ci, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
  330. ;
  331.     IF ¬ GENERATINGCFM THEN
  332.         Macro
  333.         _ImageCodecGetCompressedImageSize
  334.             dc.w                $2F3C
  335.             dc.w                $0014
  336.             dc.w                $0008
  337.             moveq               #0,d0
  338.             dc.w                $A82A
  339.         EndM
  340.     ELSE
  341.         IMPORT_CFM_FUNCTION ImageCodecGetCompressedImageSize
  342.     ENDIF
  343.  
  344. ;
  345. ; pascal ComponentResult ImageCodecGetSimilarity(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
  346. ;
  347.     IF ¬ GENERATINGCFM THEN
  348.         Macro
  349.         _ImageCodecGetSimilarity
  350.             dc.w                $2F3C
  351.             dc.w                $0014
  352.             dc.w                $0009
  353.             moveq               #0,d0
  354.             dc.w                $A82A
  355.         EndM
  356.     ELSE
  357.         IMPORT_CFM_FUNCTION ImageCodecGetSimilarity
  358.     ENDIF
  359.  
  360. ;
  361. ; pascal ComponentResult ImageCodecTrimImage(ComponentInstance ci, ImageDescriptionHandle Desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
  362. ;
  363.     IF ¬ GENERATINGCFM THEN
  364.         Macro
  365.         _ImageCodecTrimImage
  366.             dc.w                $2F3C
  367.             dc.w                $0024
  368.             dc.w                $000A
  369.             moveq               #0,d0
  370.             dc.w                $A82A
  371.         EndM
  372.     ELSE
  373.         IMPORT_CFM_FUNCTION ImageCodecTrimImage
  374.     ENDIF
  375.  
  376. ;
  377. ; pascal ComponentResult ImageCodecRequestSettings(ComponentInstance ci, Handle settings, Rect *rp, ModalFilterUPP filterProc)
  378. ;
  379.     IF ¬ GENERATINGCFM THEN
  380.         Macro
  381.         _ImageCodecRequestSettings
  382.             dc.w                $2F3C
  383.             dc.w                $000C
  384.             dc.w                $000B
  385.             moveq               #0,d0
  386.             dc.w                $A82A
  387.         EndM
  388.     ELSE
  389.         IMPORT_CFM_FUNCTION ImageCodecRequestSettings
  390.     ENDIF
  391.  
  392. ;
  393. ; pascal ComponentResult ImageCodecGetSettings(ComponentInstance ci, Handle settings)
  394. ;
  395.     IF ¬ GENERATINGCFM THEN
  396.         Macro
  397.         _ImageCodecGetSettings
  398.             dc.w                $2F3C
  399.             dc.w                $0004
  400.             dc.w                $000C
  401.             moveq               #0,d0
  402.             dc.w                $A82A
  403.         EndM
  404.     ELSE
  405.         IMPORT_CFM_FUNCTION ImageCodecGetSettings
  406.     ENDIF
  407.  
  408. ;
  409. ; pascal ComponentResult ImageCodecSetSettings(ComponentInstance ci, Handle settings)
  410. ;
  411.     IF ¬ GENERATINGCFM THEN
  412.         Macro
  413.         _ImageCodecSetSettings
  414.             dc.w                $2F3C
  415.             dc.w                $0004
  416.             dc.w                $000D
  417.             moveq               #0,d0
  418.             dc.w                $A82A
  419.         EndM
  420.     ELSE
  421.         IMPORT_CFM_FUNCTION ImageCodecSetSettings
  422.     ENDIF
  423.  
  424. ;
  425. ; pascal ComponentResult ImageCodecFlush(ComponentInstance ci)
  426. ;
  427.     IF ¬ GENERATINGCFM THEN
  428.         Macro
  429.         _ImageCodecFlush
  430.             dc.w                $2F3C
  431.             dc.w                $0000
  432.             dc.w                $000E
  433.             moveq               #0,d0
  434.             dc.w                $A82A
  435.         EndM
  436.     ELSE
  437.         IMPORT_CFM_FUNCTION ImageCodecFlush
  438.     ENDIF
  439.  
  440. ;
  441. ; pascal ComponentResult ImageCodecSetTimeCode(ComponentInstance ci, void *timeCodeFormat, void *timeCodeTime)
  442. ;
  443.     IF ¬ GENERATINGCFM THEN
  444.         Macro
  445.         _ImageCodecSetTimeCode
  446.             dc.w                $2F3C
  447.             dc.w                $0008
  448.             dc.w                $000F
  449.             moveq               #0,d0
  450.             dc.w                $A82A
  451.         EndM
  452.     ELSE
  453.         IMPORT_CFM_FUNCTION ImageCodecSetTimeCode
  454.     ENDIF
  455.  
  456. ;
  457. ; pascal ComponentResult ImageCodecIsImageDescriptionEquivalent(ComponentInstance ci, ImageDescriptionHandle newDesc, Boolean *equivalent)
  458. ;
  459.     IF ¬ GENERATINGCFM THEN
  460.         Macro
  461.         _ImageCodecIsImageDescriptionEquivalent
  462.             dc.w                $2F3C
  463.             dc.w                $0008
  464.             dc.w                $0010
  465.             moveq               #0,d0
  466.             dc.w                $A82A
  467.         EndM
  468.     ELSE
  469.         IMPORT_CFM_FUNCTION ImageCodecIsImageDescriptionEquivalent
  470.     ENDIF
  471.  
  472. ;
  473. ; pascal ComponentResult ImageCodecNewMemory(ComponentInstance ci, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
  474. ;
  475.     IF ¬ GENERATINGCFM THEN
  476.         Macro
  477.         _ImageCodecNewMemory
  478.             dc.w                $2F3C
  479.             dc.w                $0014
  480.             dc.w                $0011
  481.             moveq               #0,d0
  482.             dc.w                $A82A
  483.         EndM
  484.     ELSE
  485.         IMPORT_CFM_FUNCTION ImageCodecNewMemory
  486.     ENDIF
  487.  
  488. ;
  489. ; pascal ComponentResult ImageCodecDisposeMemory(ComponentInstance ci, Ptr data)
  490. ;
  491.     IF ¬ GENERATINGCFM THEN
  492.         Macro
  493.         _ImageCodecDisposeMemory
  494.             dc.w                $2F3C
  495.             dc.w                $0004
  496.             dc.w                $0012
  497.             moveq               #0,d0
  498.             dc.w                $A82A
  499.         EndM
  500.     ELSE
  501.         IMPORT_CFM_FUNCTION ImageCodecDisposeMemory
  502.     ENDIF
  503.  
  504. ;
  505. ; pascal ComponentResult ImageCodecHitTestData(ComponentInstance ci, ImageDescriptionHandle desc, void *data, Size dataSize, Point where, Boolean *hit)
  506. ;
  507.     IF ¬ GENERATINGCFM THEN
  508.         Macro
  509.         _ImageCodecHitTestData
  510.             dc.w                $2F3C
  511.             dc.w                $0014
  512.             dc.w                $0013
  513.             moveq               #0,d0
  514.             dc.w                $A82A
  515.         EndM
  516.     ELSE
  517.         IMPORT_CFM_FUNCTION ImageCodecHitTestData
  518.     ENDIF
  519.  
  520. ;
  521. ; pascal ComponentResult ImageCodecNewImageBufferMemory(ComponentInstance ci, CodecDecompressParams *params, long flags, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
  522. ;
  523.     IF ¬ GENERATINGCFM THEN
  524.         Macro
  525.         _ImageCodecNewImageBufferMemory
  526.             dc.w                $2F3C
  527.             dc.w                $0010
  528.             dc.w                $0014
  529.             moveq               #0,d0
  530.             dc.w                $A82A
  531.         EndM
  532.     ELSE
  533.         IMPORT_CFM_FUNCTION ImageCodecNewImageBufferMemory
  534.     ENDIF
  535.  
  536. ;
  537. ; pascal ComponentResult ImageCodecExtractAndCombineFields(ComponentInstance ci, long fieldFlags, void *data1, long dataSize1, ImageDescriptionHandle desc1, void *data2, long dataSize2, ImageDescriptionHandle desc2, void *outputData, long *outDataSize, ImageDescriptionHandle descOut)
  538. ;
  539.     IF ¬ GENERATINGCFM THEN
  540.         Macro
  541.         _ImageCodecExtractAndCombineFields
  542.             dc.w                $2F3C
  543.             dc.w                $0028
  544.             dc.w                $0015
  545.             moveq               #0,d0
  546.             dc.w                $A82A
  547.         EndM
  548.     ELSE
  549.         IMPORT_CFM_FUNCTION ImageCodecExtractAndCombineFields
  550.     ENDIF
  551.  
  552. ;
  553. ; pascal ComponentResult ImageCodecGetMaxCompressionSizeWithSources(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, CDSequenceDataSourcePtr sourceData, long *size)
  554. ;
  555.     IF ¬ GENERATINGCFM THEN
  556.         Macro
  557.         _ImageCodecGetMaxCompressionSizeWithSources
  558.             dc.w                $2F3C
  559.             dc.w                $0016
  560.             dc.w                $0016
  561.             moveq               #0,d0
  562.             dc.w                $A82A
  563.         EndM
  564.     ELSE
  565.         IMPORT_CFM_FUNCTION ImageCodecGetMaxCompressionSizeWithSources
  566.     ENDIF
  567.  
  568.  
  569. kMotionJPEGTag                    EQU        'mjpg'
  570. MotionJPEGApp1Marker    RECORD 0
  571. unused                     ds.l    1                ; offset: $0 (0)
  572. tag                         ds.l    1                ; offset: $4 (4)
  573. fieldSize                 ds.l    1                ; offset: $8 (8)
  574. paddedFieldSize             ds.l    1                ; offset: $C (12)
  575. offsetToNextField         ds.l    1                ; offset: $10 (16)
  576. qTableOffset             ds.l    1                ; offset: $14 (20)
  577. huffmanTableOffset         ds.l    1                ; offset: $18 (24)
  578. sofOffset                 ds.l    1                ; offset: $1C (28)
  579. sosOffset                 ds.l    1                ; offset: $20 (32)
  580. soiOffset                 ds.l    1                ; offset: $24 (36)
  581. sizeof                     EQU *                    ; size:   $28 (40)
  582.                         ENDR
  583. ;
  584. ; pascal ComponentResult QTPhotoSetSampling(ComponentInstance codec, short yH, short yV, short cbH, short cbV, short crH, short crV)
  585. ;
  586.     IF ¬ GENERATINGCFM THEN
  587.         Macro
  588.         _QTPhotoSetSampling
  589.             dc.w                $2F3C
  590.             dc.w                $000C
  591.             dc.w                $0100
  592.             moveq               #0,d0
  593.             dc.w                $A82A
  594.         EndM
  595.     ELSE
  596.         IMPORT_CFM_FUNCTION QTPhotoSetSampling
  597.     ENDIF
  598.  
  599. ;
  600. ; pascal ComponentResult QTPhotoSetRestartInterval(ComponentInstance codec, unsigned short restartInterval)
  601. ;
  602.     IF ¬ GENERATINGCFM THEN
  603.         Macro
  604.         _QTPhotoSetRestartInterval
  605.             dc.w                $2F3C
  606.             dc.w                $0002
  607.             dc.w                $0101
  608.             moveq               #0,d0
  609.             dc.w                $A82A
  610.         EndM
  611.     ELSE
  612.         IMPORT_CFM_FUNCTION QTPhotoSetRestartInterval
  613.     ENDIF
  614.  
  615. ;
  616. ; pascal ComponentResult QTPhotoDefineHuffmanTable(ComponentInstance codec, short componentNumber, Boolean isDC, unsigned char *lengthCounts, unsigned char *values)
  617. ;
  618.     IF ¬ GENERATINGCFM THEN
  619.         Macro
  620.         _QTPhotoDefineHuffmanTable
  621.             dc.w                $2F3C
  622.             dc.w                $000C
  623.             dc.w                $0102
  624.             moveq               #0,d0
  625.             dc.w                $A82A
  626.         EndM
  627.     ELSE
  628.         IMPORT_CFM_FUNCTION QTPhotoDefineHuffmanTable
  629.     ENDIF
  630.  
  631. ;
  632. ; pascal ComponentResult QTPhotoDefineQuantizationTable(ComponentInstance codec, short componentNumber, unsigned char *table)
  633. ;
  634.     IF ¬ GENERATINGCFM THEN
  635.         Macro
  636.         _QTPhotoDefineQuantizationTable
  637.             dc.w                $2F3C
  638.             dc.w                $0006
  639.             dc.w                $0103
  640.             moveq               #0,d0
  641.             dc.w                $A82A
  642.         EndM
  643.     ELSE
  644.         IMPORT_CFM_FUNCTION QTPhotoDefineQuantizationTable
  645.     ENDIF
  646.  
  647. ;  UPP call backs 
  648.     ENDIF ; __IMAGECODEC__ 
  649.  
  650.